﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HostActorView;
using dotSimpl.wlanner.AddIns.Contracts;

namespace HostSideAdapters
{
    [System.AddIn.Pipeline.HostAdapter]
    public class ContractToActorViewAdapter : ActorView
    {
        #region Fields

        private IActorContract _contract;
        private System.AddIn.Pipeline.ContractHandle _handle;

        #endregion

        #region Constructors

        /// <summary>
        /// Creates a new instance of adapter.
        /// </summary>
        public ContractToActorViewAdapter(IActorContract contract)
        {
            this._contract = contract;
            _handle = new System.AddIn.Pipeline.ContractHandle(contract);
        }

        #endregion

        #region ActorView Members

        public override string InternalName
        {
            get { return _contract.InternalName; }
        }

        public override string CompatibilityVersion
        {
            get { return _contract.CompatibilityVersion; }
        }

        public override KeyValuePair<string, string>[] GetInitialSettins()
        {
            return _contract.GetInitialSettins();
        }

        public override void ApplySettings(KeyValuePair<string, string>[] settings, Guid networkCard)
        {
            _contract.ApplySettings(settings, networkCard);
        }

        public override string[] GetSettingNames()
        {
            return _contract.GetSettingNames();
        }

        #endregion        
    }
}
